﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_ModifyPassword : DLL.MyAdminPage
{
	private DLL.User.Component clsUserComp;

	protected void Page_Load(object sender, EventArgs e)
	{

	}

	protected override void OnInit(EventArgs e)
	{
		clsUserComp = new DLL.User.Component(Page);

		base.OnInit(e);

		LBtnModify.Click += new EventHandler(LBtnModify_Click);
	}

	void LBtnModify_Click(object sender, EventArgs e)
	{
		if ((TbNewPassword1.Text.Trim() == "") || (TbNewPassword2.Text.Trim() == ""))
		{
			TonyNet4V1.ShowMessageAlert.ShowMessage(Page, "新密码不能为空！");
		}
		else
		{
			if (clsUserComp.ModifyPassword(nUserID, TbOldPassword.Text.Trim(), TbNewPassword1.Text.Trim(), TbNewPassword2.Text.Trim()))
			{
				TonyNet4V1.ShowMessageAlert.ShowMessage(Page, "密码修改成功！");
			}
		}
	}
}